﻿#pragma once

#include <QMainWindow>
#include <QUrl>

class CefWebEngineView;
class CefWebEnginePage;
class Ui_MainWindow;
class QProgressBar;

class MainWindow : public QMainWindow
{
    Q_OBJECT
        
public:
    MainWindow(QWidget *parent = nullptr);
    ~MainWindow();

public slots:
    void addTabPage(CefWebEngineView *view);

private slots:
    void setupSubView(const QUrl &url, CefWebEnginePage **page);
    void setupCurrentView();
    void executeActions(QAction *action);

private:
    Ui_MainWindow *ui;
    CefWebEngineView *mcurrentView;
    QList<QMetaObject::Connection> mconns;
    QProgressBar *mprogressBar;
};
